Skip to content

Conversation

@zoror2
Copy link

@zoror2 zoror2 commented Jan 6, 2026

This PR fixes deprecated timm.models.layers imports across the DeepLense repository by updating them to use the new timm.layers API.

Changes

  • Updated import statements from from timm.models.layers import ... to from timm.layers import ...
  • Affected 7 files across multiple sub-projects:
    • Transformers_Classification_DeepLense_Kartik_Sachdev/models/swin.py
    • DeepLense_Classification_Transformers_Archil_Srivastava/models/transformers/hybrid_swin.py
    • 5 notebook files in DeepLense_Gravitational_Lens_Classification_Transformers_Dhruv_Srivastava/

Testing

  • Verified all affected models can be imported without warnings
  • Tested with warnings.simplefilter('always') to catch any remaining deprecation warnings
  • No functionality changes - purely import path updates

Impact

  • Eliminates FutureWarning messages during imports
  • Ensures forward compatibility with future timm releases
  • No breaking changes to existing functionality

- Updated all imports from timm.models.layers to timm.layers
- Resolves FutureWarning deprecation notices
- Ensures compatibility with future timm versions
- Affects 7 files across 3 different projects
- Tested: All imports verified without warnings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant